package Lambda表达式;

import java.util.Arrays;

public class 练习 {
    public static void main(String[] args) {
        String[] strArr={"a","aaa","aaaaa","aaaa","aa"};
        Arrays.sort(strArr,(o1, o2) ->o1.length()-o2.length() );
        System.out.println(Arrays.toString(strArr));
    }
}
